<template>
	<div class="top">
		<p>调课详情</p>
		<span @click="goBack">返回</span>
	</div>
	 <el-form
	    ref="ruleFormRef"
	    :model="formData"
	    :rules="rules"
	    label-width="auto"
	    class="demo-ruleForm"
	    status-icon
		hide-required-asterisk=true
	  >
		<el-row justify="center">
		    <el-col :span="8">
				<el-form-item label="申请老师:" prop="telname" >
				    <el-input v-model="formData.teaName" style="width: 205px;" readonly />
				</el-form-item>
				<el-form-item label="所调课程:" prop="subId">
					<el-input v-model="formData.subName" style="width: 205px;" readonly />
				</el-form-item>
				<el-form-item label="所调班级:" prop="clazzId">
					<el-input v-model="formData.clazzName" style="width: 205px;" readonly />
				</el-form-item>
				<el-form-item label="原上课时间:" prop="oldTime">
					 <el-input v-model="formData.oldTime" style="width: 205px;" readonly />
				</el-form-item>
				<el-form-item label="调课时间:" prop="newTime">
					 <el-input v-model="formData.newTime" style="width: 205px;" readonly />
				</el-form-item>
			</el-col>
		    <el-col :span="8">
				<el-form-item label="申请日期:" prop="createTime">
					<el-input v-model="formData.createTime" style="width: 205px;" readonly />
				</el-form-item>
				<el-form-item label="审批人:">
				    <el-input v-model="formData.userName" style="width: 205px;" readonly />
				</el-form-item>
			</el-col>
		  </el-row>
		
	  </el-form>
</template>

<script setup lang="ts">
	import {reactive,ref,defineEmits,defineProps} from 'vue'
	import {GetDetialChangeClass} from '@/api/zzx'
	let emit=defineEmits(["back"])
	let prop=defineProps(["reaId"])
	let reaId=prop.reaId
	// interface RuleForm {
	//   telname:string,
	//   clazzId:string,
	//   subId:string,
	//   oldTime:string,
	//   newTime:string,
	//   createTime:string,
	//   userId:string
	// }
	let formData=reactive({})
	
	//获取调课详情
	const getDetial=async ()=>{
		let res=await GetDetialChangeClass({
			rId:reaId
		})
		
		Object.assign(formData,res)
		//formData=res
		console.log("详情",res)
		console.log(formData)
	}
	getDetial()
	
	//点击返回
	const goBack=()=>{
		emit("back")
	}
</script>

<style scoped>
	.top{
		display: flex;
		justify-content: space-between;
		align-items: center;
		p{
			font-size: 21px;
			font-weight: 600;
		}
		span{
			font-size: 17px;
		}
	}
	
	.demo-ruleForm{
		margin-top: 30px;
	}
	
</style>